<style type="text/css">
    #p-images > li {
    margin-top: 0px;
}
    #region_address .n-error{
        margin-left: 250px;
    }
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-Id" class="form-control" name="row[Id]" type="text" value="{$row.id|htmlentities}" disabled="">
        </div>
    </div>

       <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>所屬中心:</label>
        <div class="row">
            <div class="col-xs-9" id="region_address">
                 <input  class="form-control" type="text" value="{$row.affiliated_center_text|htmlentities}" disabled="disabled">
               
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User.avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" data-msg-required="  " placeholder="請上傳圖片"  size="50" name="" type="text" value="{$row.avatar|htmlentities}"  style="display: none;">
                <div class="input-group-addon no-border no-padding">
                    <span style="display: none;"><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images" data-template="customtpl"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User.nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" type="text" value="{$row.nickname|htmlentities}" disabled="disabled">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="length(~50)" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="length(~20)" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
   <!--  <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>{:__('Region_address')}:</label>
        <div class="row">
            <div class="col-xs-9" id="region_address">
                <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                    <select data-rule="required" class="province form-control" name="province" data-url="region/area">
                        {if $province}
                            <option value="{$province.value|htmlentities}" selected>{$province.name|htmlentities}</option>
                        {/if}
                    </select>
                    <select data-rule="required" class="city form-control" name="city" data-url="region/area">
                        {if $city}
                            <option value="{$city.value|htmlentities}" selected>{$city.name|htmlentities}</option>
                        {/if}
                    </select>
                    <select data-rule="required" class="area form-control" name="district" data-url="region/area">
                        {if $district}
                            <option value="{$district.value|htmlentities}" selected>{$district.name|htmlentities}</option>
                        {/if}
                    </select>
                </div>
            </div>
        </div>
    </div> -->


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="length(~50)" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Volunteer_specialty_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cat_id" data-rule="required" data-source="volunteer_specialty/index" placeholder="請選擇專長" class="form-control selectpage" name="row[volunteer_specialty_id]" type="text" value="{$row.volunteer_specialty_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_time_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-service_time_type" class="form-control selectpicker" name="row[service_time_type]">
                {foreach name="serviceTimeTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.service_time_type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Training_staff')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-training_staff" class="form-control" name="row[training_staff]" type="text" value="{$row.training_staff|htmlentities}" data-rule="length(~10)">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Emergency_contact')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-emergency_contact" class="form-control" name="row[emergency_contact]" type="text" value="{$row.emergency_contact|htmlentities}" data-rule="length(~20)">
        </div>
    </div>
   <!--  <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Staff_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-staff_id" data-rule="required" data-source="staff/index" data-field="nickname"
 class="form-control selectpage" name="row[staff_id]" type="text" value="{$row.staff_id|htmlentities}">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">身份證前綴:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_card_front" class="form-control" name="row[id_card_front]" type="text" value="{$row.id_card_front|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Id_card')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_card" class="form-control" name="row[id_card]" type="text" value="{$row.id_card|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">身份證後綴:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_card_after" class="form-control" name="row[id_card_after]" type="text" value="{$row.id_card_after|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Birthday')}:</label>
        <div class="col-xs-12 col-sm-8">
           <input id="c-arrivaltime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM" data-use-current="true" name="row[birthday]" type="text" value="{:date('Y-m')}" placeholder="請選擇">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('微信Id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" class="form-control" name="row[wechat_id]" type="text" value="{$row.wechat_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('內地手機號')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" class="form-control" name="row[mobile_china]" type="text" value="{$row.mobile_china|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务偏好')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" class="form-control" name="row[service_type]" type="text" value="{$row.wechat_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('備註')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-email" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/html" id="customtpl">
    <li class="col-xs-3">
        <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail"><img src="<%=fullurl%>" class="img-responsive"></a>
    </li>
</script>